package com.itheima.d1_reflect_field;

public class Student {


    private  int age;
    private  String sex;
    private  String name;
    public static String schoolName;
    public static final String COUNTRY = "China";
    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                ", sex='" + sex + '\'' +
                ", name='" + name + '\'' +
                '}';
    }

//    private Student() {
//        System.out.println("无参构造器触发");
//    }
    public Student() {
        System.out.println("无参构造器触发");
    }

    public Student(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        System.out.println("有参构造器触发");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }



}
